Kill gpg agent in package-test.el to avoid a race
authorRob Browning <rlb@defaultvalue.org>
Mon, 10 Oct 2016 22:35:56 +0000 (17:35 -0500)
committerRob Browning <rlb@defaultvalue.org>
Tue, 15 May 2018 06:03:18 +0000 (01:03 -0500)
commitbf56e978684eeebc859fc70983a8805d8210b149
tree7cba4f5ff5fb9e5fc38f3bc0376aa9d4a74b4041
parent6676f1cb9a837dc0cdcc3a36588c4e3a43287d0b
Kill gpg agent in package-test.el to avoid a race

package-test.el should no longer fail during clean up.

* Previously a delete-directories call raced with the gpg agent's own
  cleanup process (presumably triggered by the first deletion of one of
  the agent's sockets).  As a result, it looks like the agent might
  delete one of its sockets after delete-directories had decided to
  delete the socket, but before it made the attempt, causing an
  exception.

* To fix the problem, explicitly ask gpg-connect-agent to kill the agent
  before attempting to delete the gnupg home directory, and then delete
  via "rm -rf" to ignore any vanishing files.
test/automated/package-test.el